package com.example.enums;

public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200,"操作成功"),
    //
    PASSWORD_ERROR(1,"用户名或密码错误!!"),
    PARAM_ERROR(2,"参数错误"),
    DELETE_ERROR(3,"删除异常，请联系系统管理员"),
    DELETE_ADMIN_ERROR(4,"你的操作很危险，小心被加入人口清除计划"),
    NAME_ERROR(5,"该名称已存在"),
    SELECT_ERROR(6,"不存在该数据"),
    ROLE_NAME_ERROR(7,"职能名称不能为空"),
    EXIT_USER_ERROR(8,"此用户已存在"),
    STUDENT_ID_ERROR(9,"此学号已存在"),
    TOKEN_ERROR(-1,"登录过期"),
    SYSTEM_ERROR(-2,"系统忙");
    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}